#pragma once

#include "ScriptCompiler/AST/ExpressionNode.h"
#include "ScriptCompiler/AST/SentenceNode.h"

class CScriptToken;
class CSentenceBlockNode;

class CForNode : public CSentenceNode
{
public:
    CForNode(std::weak_ptr<CScriptFileContext> InFile)
        : CSentenceNode(InFile,EASTNodeType::For)
    {
    }

    //for
    std::shared_ptr<CScriptToken> For;

    //init , can be null
    std::shared_ptr<CSentenceNode> Init;

    //condition , can be null
    std::shared_ptr<CExpressionNode> Condition;

    //step , can be null
    std::shared_ptr<CSentenceNode> Step;

    //body
    std::shared_ptr<CSentenceBlockNode> Body;

    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return For; }


};